﻿@using Resources;
@{
    Layout = "~/Views/Shared/Layaout/convocatoria/_LayoutConvocatoriaV2.cshtml";
}
<script type="text/javascript">
    $(function () {
        calendarioGeneral('fecIniVig', '0');
        calendarioGeneral('fecFinVig', '1');
        setAutoAyudaEmpresa("#ideEmpresa", "#codPaisDoc", "#tipoDocum", "#NumDocum", "#v_Nombres", "/AutoAyuda/ListaEmpresaAuto", "1");
        setAutoAyudaEmpresa("#ideEmpresa", "#codPaisDoc", "#tipoDocum", "#v_Nombres", "#NumDocum", "/AutoAyuda/ListaEmpresaAuto", "2");
        var n_IdeConvoNew =$("#nIdeConvoNew").val();
        if (n_IdeConvoNew.length >0) {
            $("#spConvocatoria").click();
        }
        inicioPopPupModal("#poPup", 380, 950, "DETALLE DE LA CONVOCATORIA");        
    });
</script>
<script type="text/javascript" src="@Url.Content(@properties.convocatoriaJS)" ></script>
<input type="hidden" id="ideEmpresa" />
<input type="hidden" id="nIdeConvoNew" value="@ViewBag.nIdeConvocatoria"/>
<span onclick="javascript:listaConcocatoriaById('#divDetalle');" id="spConvocatoria"></span> 
<div id="tituloOpcion">@ViewBag.TITULO</div>
<div id="divCabeceraInterno">
    <table style="width:900px;" class="tblCab" border="1">
        <thead>        
        <tr>
            <th>Clase</th>
            <th>País Emisor</th>
            <th>Tipo Documento</th>
            <th>Núm. Documento</th>
            <th>Nombre o Razón Social de la Institución</th>
            <th>Fecha Inicio<span class="asterisco">(*)</span></th>
            <th>Fecha Fin<span class="asterisco">(*)</span></th>
            <th><input type="button" value="Nuevo" onclick="javascript: RegistrarConvocatoriaPabe('#divDetalle');" /></th>
        </tr>
        </thead>
        <tr>
            <td>@Html.DropDownList("nClaseTramite", (IEnumerable<SelectListItem>)ViewBag.ClaseTramite, "--Seleccione--")</td>
            <td>@Html.DropDownList("codPaisDoc", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor)</td>
            <td>@Html.DropDownList("tipoDocum", (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--")</td>
            <td>@Html.TextBox("NumDocum", null, new { style = "width:80px;", maxlength = 10 })</td>
            <td class="center">
                <table class="tblCero">
                    <tr>
                        <td>@Html.TextBox("v_Nombres", null, new {style = "width:235px;", maxlength = 120 })</td>
                    </tr>
                </table>
            </td>
            <td>@Html.TextBox("fecIniVig", null, new {maxlength = 10, @Value="01/01/2013" })</td>
            <td>@Html.TextBox("fecFinVig", null, new {maxlength = 10 })</td>
            <td><input type="button" value="Consultar" onclick="javascript: listarConvocatoriaPabe('#divDetalle');" /></td>
        </tr>
    </table>    
</div>
<div id="divDetalle"></div>
<div id="poPup"></div>